<!--
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
-->
<template>
  <div class="op2-analysis">
    <Analysis v-if="showAnalysis" @handleEvent="handleEvent" />
    <Step v-if="showStep" :rowId="rowId" :sectionList="sectionList" @handleEvent="handleEvent"  />
  </div>
</template>
<script setup name="Op2Analysis">
import Step from './Step.vue';
import Analysis from './Analysis.vue';
const showAnalysis = ref(true);
const showStep = ref(false);
const sectionList = ref([]);
const rowId = ref('');
const handleEvent = (data) => {
  if (data.component === 'Analysis') {
    showAnalysis.value = true;
    showStep.value = false;
  }
  if (data.component === 'Step') {
    sectionList.value = data.sectionList;
    rowId.value = data.rowId;
    showAnalysis.value = false;
    showStep.value = true;
  }
};
</script>
<style lang="scss" scoped>
.op2-analysis {
  height: calc(100vh - 84px);
  width: 100%;
  overflow-y: auto;
}
</style>